Accusoft.ThumbnailXpress6.ActiveX
Set Threading Behavior

Threading in Image Generation

ThumbnailXpress™ uses background image generation threads to improve responsiveness. At component start-up, ThumbnailXpress determines an initial count of background threads based on the host computer's capabilities. To keep operation responsive, ThumbnailXpress monitors the time consumed by a background thread and will start an additional thread when it has determined that a particular thread's image retrieval/generation time has exceeded the user settable ThreadStartThreshold property value.

By default, the value of this property is 3000 milliseconds (3 seconds). Additionally, ThumbnailXpress will abandon a thread, and free up its resources, if its retrieval/generation time has exceeded the ThreadHungThreshold property value. By default, the value of this property is 9000 milliseconds (9 seconds). As noted, when needed, ThumbnailXpress will create additional threads but will not allow the count of concurrent background threads to exceed the value specified by the MaximumThreadCount property.

The default value for the MaximumThreadCount property is 2 times the calculated initial count of background threads. The allowable value range for this property is 1 thru 32. Too many background threads quickly degrade performance and a good rule of thumb for all these threading properties is unless there is good reason to change, leave them at the default values. For applications that don’t desire an image loading attempt be abandoned and want to allow, for example, the potential of very slow internet access for retrieving images, set the ThreadHungThreshold property to a higher value.

Multiple ThumbnailXpress Instances

It's important not to run one instance of the control from multiple application threads, instead, create a separate instance of the control for each application thread. For a well-presented primer on threading, see Microsoft's "What Every Dev Must Know About Multithreaded Apps" at the Visual Studio.NET Developer Center (08/05, http://msdn.microsoft.com/en-us/magazine/cc163744.aspx).

The Performance tab in the Microsoft Windows Task Manager dialog box (hold Ctrl, Alt and Delete) displays multiple CPU Usage History boxes for both logical and physical CPUs. The image below shows a single CPU with two logical CPU's.

 

See Also

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback